public class 方法重载 {
    public static int add(int a,int b) {
        return a+b;
    }
    public static int add(int a,int b,int c) {
        return a+b+c;
    }
    public static double add(double a,double b) {
        return a+b;
    }

    public static void main(String[] args) {
        int a = 10;
        int c = 20;
        int b = 30;
        double a1 = 1.0;
        double b1 = 2.0;

        System.out.println(" add(a,b) = "+ add(a,b));
        System.out.println(" add(a,b,c) = "+ add(a,b,c));
        System.out.println(" add(a1,b1) = "+ add(a1,b1));

    }
}
